package edu.stthomas.seis770.visitor;

import COM.hilbertinc.xml.HDOMParser;
import COM.hilbertinc.xml.HDOMVisitor;
import org.w3c.dom.Document;

public class HTMLDomParser extends HDOMParser {
    /**
     * Override HDOMParser so processNode method is called recursively on the document node objects
     * This is to support HTMLVisitor for Exercise part 2
     * @param visitor HDOMVisitor visitor used to visit document
     * @throws Exception
     */
    @Override
    public void traverse(HDOMVisitor visitor) throws Exception {
        Document doc = getDocument();
        if (doc == null || visitor == null) {
            return;
        }
        super.processNode(visitor, doc);

    }
}
